<template>
  <div>
    <!-- 侧边栏 -->

    <!-- 顶部导航栏 -->
    <van-sticky :offset-top="0">
      <van-nav-bar title="万山" class="dingbu">
        <template #left>
          <van-icon name="more-o" size="22" color="#ccc" />
        </template>
        <template #right>
          <van-icon name="search" size="22" color="#ccc" />
        </template>
      </van-nav-bar>
    </van-sticky>
    <!-- 顶部图 -->
    <div class="top_tu">
      <h1 class="title">万山之宗</h1>
      <van-image
        width="100%"
        height="20rem"
        fit="cover"
        src="https://img01.yzcdn.cn/vant/cat.jpeg"
      />
    </div>
    <!-- 热门栏 -->
    <div class="hot">
      <h2>热门</h2>
      <div class="lunbotu">
        <van-swipe class="my-swipe" indicator-color="white">
          <van-swipe-item v-for="r1 in 4">
            <div id="r1">
              <van-image
                width="100%"
                fit="cover"
                src="https://img01.yzcdn.cn/vant/cat.jpeg"
              />
              <van-icon
                id="rm_sc"
                class="shoucang"
                name="like-o"
                size="18"
                color="#78006e"
              />
            </div>
          </van-swipe-item>
        </van-swipe>
      </div>
    </div>
    <!-- 兴趣栏 -->
    <div class="column">
      <h2>按兴趣浏览</h2>
      <van-swipe>
        <van-swipe-item v-for="c_card in 4">
          <div class="column_card" id="c_card">
            <van-image
              width="100%"
              height="50%"
              fit="cover"
              src="https://img01.yzcdn.cn/vant/cat.jpeg"
            />
            <h4>千湖之地</h4>
            <van-divider
              :style="{
                borderColor: '#c8c8c8',
                padding: '0 1rem',
              }"
            >
            </van-divider>
            <span
              >了解详情&nbsp;&nbsp;<van-icon name="arrow" size="16px"
            /></span>
          </div>
        </van-swipe-item>
      </van-swipe>
    </div>
    <!-- 喜欢栏 -->
    <div class="column">
      <h2>你可能会喜欢</h2>
      <van-swipe>
        <van-swipe-item v-for="c_card in 4">
          <div class="column_card" id="c_card">
            <van-image
              width="100%"
              height="50%"
              fit="cover"
              src="https://img01.yzcdn.cn/vant/cat.jpeg"
            />
            <span class="xiaobiao">万山之宗</span>
            <van-icon class="shoucang" name="like-o" size="18" />
            <h4>日月山</h4>
            <p>
              日月山不仅有恢宏的历史意义， 它还有非常重大的地理意义。
              它位于我国季风区与非季风区的 分界线上，地处黄土高原与青藏
              高原的叠合区，是青海省内外流 域的天然分界线，划分了农耕文
              明与游牧文明。
            </p>
            <van-divider
              :style="{
                borderColor: '#c8c8c8',
                padding: '0 1rem',
              }"
            >
            </van-divider>
            <span
              >了解详情&nbsp;&nbsp;<van-icon name="arrow" size="16px"
            /></span>
          </div>
        </van-swipe-item>
      </van-swipe>
    </div>
    <!-- 行程栏 -->
    <div class="column">
      <h2>行程</h2>
      <h4 id="tansuo">尽情探索</h4>
      <van-swipe>
        <van-swipe-item v-for="t_card in 4">
          <div class="column_card" id="t_card">
            <van-image
              width="100%"
              height="50%"
              fit="cover"
              src="https://img01.yzcdn.cn/vant/cat.jpeg"
            />
            <span class="xiaobiao">万山之宗</span>
            <van-icon class="shoucang" name="like-o" size="18" />
            <h4>旅游路线</h4>
            <p>
              第一天：西宁→湟源峡谷→日月山→倒淌河→共和县→玛多县
              <br>
              沿途可以看到自然风光日月山，又称“赤岭”，是青海省农
              牧业区的分界线，还可以看到一条倒淌河，倒淌河是由于
              地壳运动，青藏高原高高隆起，将这条河流的方向改变为
              自东向西的方向，故称为“倒淌河”。
            </p>
            <van-divider
              :style="{
                borderColor: '#c8c8c8',
                padding: '0 1rem',
              }"
            >
            </van-divider>
            <span
              >了解详情&nbsp;&nbsp;<van-icon name="arrow" size="16px"
            /></span>
          </div>
        </van-swipe-item>
      </van-swipe>
    </div>
    <!-- 探索栏 -->
    <div class="column">
      <h2>继续探索</h2>
      <van-swipe>
        <van-swipe-item v-for="c_card in 4">
          <div class="column_card" id="c_card">
            <van-image
              width="100%"
              height="50%"
              fit="cover"
              src="https://img01.yzcdn.cn/vant/cat.jpeg"
            />
            <h4>千湖之地</h4>
            <van-divider
              :style="{
                borderColor: '#c8c8c8',
                padding: '0 1rem',
              }"
            >
            </van-divider>
            <span
              >了解详情&nbsp;&nbsp;<van-icon name="arrow" size="16px"
            /></span>
          </div>
        </van-swipe-item>
      </van-swipe>
    </div>

    <!-- 底部栏 -->
  </div>
</template>

<script>
export default {};
</script>

<style lang="scss" scoped>





// ///////////////////////////////////////////////////////////

// 顶部样式

.dingbu {
  background-color: #fff;
}
.top_tu {
  display: flex;
  position: relative;
  top: 0;
  padding-bottom: 2rem;
  .title {
    position: absolute;
    z-index: 10;
    top: 55%;
    left: 2rem;
    color: #fff;
    font-size: 3rem;
  }
}

// 内容样式

.hot {
  padding-bottom: 2rem;
  h2 {
    padding: 0 0 1rem 1.5rem;
  }
}
h2 {
  font-size: 1.8rem;
}
.lunbotu {
  display: block;
}
.xiaobiao {
  position: absolute;
  top: 1.5rem;
  left: 1rem;
  text-align: center;
  font-size: small !important;
  padding: 0.5rem !important;
  color: #fff;
  border-radius: 10px;
  background-color: rgba($color: #000000, $alpha: 0.1);
}

// 收藏图标
.shoucang {
  position: absolute;
  top: 1.5rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  color: #fff;
  background-color: rgba($color: #000000, $alpha: 0.1);
  border-radius: 50%;
  line-height: 2.5rem;
  text-align: center;
  transform-origin: center center;
  font-weight: 900;
}

// 热门收藏图标

#rm_sc {
  background-color: #fff;
  top: 2rem;
  right: 1.5rem;
}


.my-swipe .van-swipe-item {
  color: #fff;
  font-size: 20px;
  text-align: center;
}

// 栏目卡
.column {
  padding: 1.5rem;
  #t_card {
    background-color: #78006e;
    color: #fff;
  }
  #tansuo {
    background-color: #78006e;
    color: #fff;
    line-height: 2rem;
    text-align: center;
    border-radius: 1rem;
    width: 30%;
  }
  .column_card {
    box-shadow: 0 0 5px 5px #ddd;
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem 0.5rem;
    position: relative;

    h4 {
      padding: 1rem 0 1rem 1rem;
      font-size: 20px;
    }
    p {
      padding: 0 1rem;
      overflow: hidden;
      word-break: break-all;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
    }
    span {
      padding: 0 0 1rem 1rem;
      font-size: 20px;
      display: block;
    }
  }
}
</style>
